package com.pactera.jep.service.sys.dto;

import com.pactera.jep.service.sys.util.AESEncoder;

public class Password {
    private String password;
    private String newPassword;
    private String repeatPassword;

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public String getRepeatPassword() {
        return repeatPassword;
    }

    public void setRepeatPassword(String repeatPassword) {
        this.repeatPassword = repeatPassword;
    }

    public void decode(){
        this.password = AESEncoder.decrypt(this.password).split("\\.")[0];
        this.newPassword = AESEncoder.decrypt(newPassword).split("\\.")[0];
        this.repeatPassword = AESEncoder.decrypt(repeatPassword).split("\\.")[0];
    }
}
